//根据申菱UI样式 重写对应antd组件的样式
#root {
  .sl-header {
    height: 56px;
    line-height: 1;
    padding: 0 16px 0;
    background-color: #fff;
    box-shadow: rgba(17, 68, 117, 0.08) 0 2px 8px 0;
    position: relative;
    z-index: 10;
  }
  .sl-menu {
    border: 0;
    .ant-menu-item {
      width: auto;
    }
    .ant-menu-submenu-title {
      width: auto;
      padding-right: 16px;
      .anticon:last-child {
        min-width: 14px;
        font-size: 14px;
      }
    }
    .ant-menu-submenu-selected > .ant-menu-submenu-title,
    .ant-menu-submenu-active .ant-menu-submenu-title {
      color: @color-main;
      .ant-menu-item-icon {
        color: @color-main;
      }
      .anticon-up,
      .anticon-down {
        color: @color-secondary;
      }
    }
    .ant-menu-sub > .ant-menu-item {
      //16 + 24 + 10
      padding-left: 50px !important;
    }
  }
  .sl-menu.ant-menu-inline-collapsed {
    .ant-menu-item,
    .ant-menu-submenu-title {
      //40是ant-layout-sider 收缩的时候的宽度
      //(40 - 24) / 2
      padding: 0 8px;
      > .ant-menu-item-icon {
        font-size: 24px;
      }
    }
  }

  .sl-dropdown-menu {
    .ant-dropdown-menu-item-icon {
      min-width: 20px;
      font-size: 20px;
      color: @color-secondary;
    }
    .ant-dropdown-menu-item,
    .ant-dropdown-menu-submenu-title {
      padding-left: 16px;
      padding-right: 16px;
    }
  }
  //table
  .ant-table-wrapper {
    .ant-table-thead > tr > th::before {
      display: none;
    }
    .ant-pagination {
      margin: 0;
      background-color: #fff;
      padding: 16px;
      border-bottom-left-radius: 4px;
      border-bottom-right-radius: 4px;
      align-items: center;
    }
  }
  .ant-table-wrapper:not(.no-pagination) {
    .ant-table {
      border-bottom-left-radius: 0;
      border-bottom-right-radius: 0;
    }
  }

  .ant-table-empty-noborder {
    .ant-table-placeholder {
      .ant-table-cell {
        border: 0;
      }
    }
  }
  .ant-table-thead > tr > th {
    font-weight: 600;
  }
  //table
  // .sl-fit-table {
  //   height: 100%;
  //   > .ant-spin-nested-loading {
  //     height: 100%;
  //     > .ant-spin-container {
  //       height: 100%;
  //       display: flex;
  //       flex-direction: column;
  //       .ant-table {
  //         flex: 1;
  //         overflow: hidden;
  //         .ant-table-container {
  //           height: 100%;
  //           display: flex;
  //           flex-direction: column;
  //         }
  //         .ant-table-body {
  //           flex: 1;
  //           overflow: auto !important;
  //         }
  //       }
  //     }
  //   }
  //   .ant-table-empty {
  //     .ant-table-body > table {
  //       height: 100%;
  //     }
  //   }
  // }
  .sl-table-empty {
    .ant-table-body table {
      height: 100%;
      .ant-table-cell {
        border: 0;
      }
    }
  }
  //mini pagination
  .ant-pagination.mini {
    height: 60px;
    padding-top: 0;
    padding-bottom: 0;
  }
  .mini {
    .ant-pagination-prev {
      & + .ant-pagination-item {
        margin-left: 5px;
      }
    }
    .ant-pagination-item-link {
      font-size: 16px;
      color: @color-secondary;
    }
    .ant-pagination-disabled {
      .ant-pagination-item-link {
        color: @color-disabled;
      }
    }
    .ant-pagination-item {
      margin-right: 5px;
      a {
        color: @color-secondary;
      }
    }
    .ant-pagination-item-active {
      background-color: #4285f4;
      a {
        color: #fff;
      }
    }
    .ant-pagination-options {
      margin-left: 18px;
    }
    .ant-pagination-total-text {
      flex: 1 1 0;
      color: @color-secondary;
    }
  }
  .sl-pagination-px0 {
    .ant-pagination {
      padding-left: 0;
      padding-right: 0;
    }
  }
  //drawer
  .sl-inside-drawer {
    .ant-drawer-header {
      display: block;
    }
    .ant-drawer-header-title {
      flex-direction: row-reverse;
    }
    .ant-drawer-title {
      flex: 1 1 0%;
      font-weight: 600;
    }
    .ant-drawer-close {
      margin-right: 0;
    }
  }
  .sl-drawer {
    .ant-drawer-footer {
      padding: 24px;
      border-top: 0;
    }
  }
  //cascader-menus
  .sl-cascader-menus {
    .ant-cascader-menu {
      height: 250px;
    }
  }
  //tag
  .sl-tag {
    border-radius: 4px;
    border: 0;
    line-height: 22px;
    margin: 0;
    font-size: 14px;
  }
  .sl-tag.ant-tag-green {
    background-color: fade(@color-success, 10);
    color: @color-success;
  }
  .sl-tag.ant-tag-red {
    background-color: fade(@color-danger, 10);
    color: @color-danger;
  }
  //dialog
  .sl-dialog {
    .ant-modal-footer {
      padding: 24px;
      padding-top: 0;
      border-top: 0;
      .ant-btn + .ant-btn:not(.ant-dropdown-trigger) {
        margin-left: 16px;
      }
    }
  }
  //modal
  .ant-modal-confirm .ant-modal-confirm-btns .ant-btn + .ant-btn {
    margin-left: 16px;
  }
  .ant-modal-title {
    font-weight: 600;
  }
  //upload
  .ant-upload.ant-upload-select-picture-card {
    width: auto;
    height: auto;
  }
  //对Modal[method]的弹框样式覆盖
  .sl-info-modal {
    .ant-modal-body {
      padding-top: 0;
      padding-left: 0;
      padding-right: 0;
      .anticon {
        float: none;
        position: absolute;
        top: 50%;
        left: 24px;
        transform: translateY(-50%);
        font-size: 32px;
        margin-top: -3px;
      }
    }
    .ant-modal-confirm-title {
      padding: 16px 24px;
      border-bottom: 1px solid #f2f3f4;
    }
    .ant-modal-confirm-content {
      padding: 0 24px 0 32px;
      margin-top: 28px;
      font-size: 16px;
    }
    .ant-modal-confirm-btns {
      padding-right: 24px;
      margin-top: 28px;
      .ant-btn {
        padding-left: 24px;
        padding-right: 24px;
      }
    }
  }
  //select tree
  .ant-select-tree {
    .ant-select-tree-treenode {
      &:hover {
        background-color: #f5f5f5;
      }
      padding-bottom: 0;
      background-color: #ffffff;
      transition: background-color 0.3s;
    }
    .ant-select-tree-treenode-selected {
      background-color: #e8f4ff !important;
    }
    .ant-select-tree-switcher {
      line-height: @sl-height-base;
    }
    .ant-select-tree-node-content-wrapper {
      line-height: @sl-height-base;
      transition: none;
      &:hover {
        background: none;
      }
    }
  }
  //small
  .ant-radio-group-small{
    .ant-radio-button-wrapper{
      font-size: 12px;
    }
  }
  .ant-picker-small{
    height: 30px;
    .ant-picker-input{
      input {
        font-size: 12px;
      }
    }
  }
  .ant-select-sm{
    .ant-select-selection-item{
      font-size: 12px;
    }
  }
  .dropdown-sm{
    .ant-select-item{
      min-height: 30px;
      font-size: 12px;
      padding:0 7px;
      line-height: 30px;
    }
  }
}
.sl-status {
  .ant-result-icon {
    // margin-bottom: 30px;
    > .anticon {
      font-size: 100px;
    }
  }
}

@media (max-width: 370px) {
  .ant-pagination-total-text {
    display: none !important;
  }
}
